#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Time: 2022/12/22 10:35
# @Author: scg
# @Email: xxx@gmail.com
# @File：index_page.py
from selenium.webdriver.common.by import By
from pages.base_page import BasePage


class IndexPage(BasePage):
    url = '/crm/index.php?m=dynamic&a=index'

    clue_locator = (By.LINK_TEXT, '线索')
    customer_locator = (By.LINK_TEXT, '客户')
    product_locator = (By.LINK_TEXT, '产品')

    def click_clue(self):
        self.driver.find_element(*self.clue_locator).click()

    def click_customer(self):
        self.driver.find_element(*self.customer_locator).click()

    def click_product(self):
        self.driver.find_element(*self.product_locator).click()
